using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AssetFrame.Message;
using System.Reflection;
using SysFrame.BP;
using SysFrame.Message;

namespace AssetFrame.BP
{
    /// <summary>
    /// asset_a3方法
    /// </summary>
    public class BLLasset_a3
    {
        public Iasset_a3 interface_asset_a3;

        public BLLasset_a3()
        {
            object obj = BPBase.GetAchieve("AssetFrame.BP","asset_a3");
            interface_asset_a3 = (Iasset_a3)obj;
        }


        /// <summary>
        /// 得到asset_a3实体
        /// </summary>
        /// <param name="msq">条件</param>
        /// <returns></returns>
        public List<Msasset_a3> Getasset_a3MsByQuery(MsQuery msq)
        {
            return interface_asset_a3.Getasset_a3MsByQuery(msq);
        }

        /// <summary>
        /// 通过ASSET_A3_AUTOID得到实体
        /// </summary>
        /// <param name="ASSET_A3_AUTOID">ID</param>
        /// <returns>实体</returns>
        public Msasset_a3 Getasset_a3MsByKey(string ASSET_A3_AUTOID)
        {
            MsQuery msquery = new MsQuery();
            msquery.strquery += " and ASSET_A3_AUTOID='" + ASSET_A3_AUTOID + "' ";
            List<Msasset_a3> lstData = Getasset_a3MsByQuery(msquery);
            return lstData[0];
        }

        /// <summary>
        ///  保存asset_a3信息
        /// </summary>
        /// <param name="ms">实体信息</param>
        /// <returns>消息</returns>
        public MsReturned Saveasset_a3(Msasset_a3 ms)
        {
            return interface_asset_a3.Saveasset_a3(ms);
        }

        /// <summary>
        /// 得到数据类型
        /// </summary>
        /// <param name="msquery">条件</param>
        /// <returns>数据类型</returns>
        public MsReturned Getasset_a3ByQuery(MsQuery msquery)
        {
            return interface_asset_a3.Getasset_a3ByQuery(msquery);
        }

        /// <summary>
        /// 删除asset_a3
        /// </summary>
        /// <param name="msq">条件</param>
        /// <returns></returns>
        public MsReturned Deleteasset_a3ByQuery(MsQuery msq)
        {
            return interface_asset_a3.Deleteasset_a3ByQuery(msq);
        }
        /// <summary>
        /// 删除asset_a3
        /// </summary>
        /// <param name="msq">条件</param>
        /// <returns></returns>
        public MsReturned Deleteasset_a3ByKey(string ASSET_A3_AUTOID)
        {
            MsQuery msquery = new MsQuery();
            
             if (ASSET_A3_AUTOID.IndexOf(",") > 0)
            {
                msquery.strquery += " and ASSET_A3_AUTOID in (" + ASSET_A3_AUTOID + ") ";
            }
            else
            {
                msquery.strquery += " and ASSET_A3_AUTOID='" + ASSET_A3_AUTOID + "' ";
            }
            return interface_asset_a3.Deleteasset_a3ByQuery(msquery);
        }
    }
}
